package net.jiastudy.biz.assessment.service;

import com.baomidou.mybatisplus.plugins.Page;
import net.jiastudy.biz.assessment.entity.AssessDetailTreeVo;
import net.jiastudy.biz.assessment.entity.Assessment;
import net.jiastudy.biz.assessment.entity.AssessmentCreateVo;
import net.jiastudy.biz.assessment.entity.AssessmentDetail;
import net.jiastudy.biz.assessment.entity.AssessmentDetailShowVo;
import net.jiastudy.biz.assessment.entity.AssessmentPersonCreateVo;
import net.jiastudy.biz.assessment.entity.AssessmentScore;
import net.jiastudy.biz.user.entity.User;
import org.springframework.data.domain.Sort;

import java.util.List;
import java.util.Map;

public interface AssessmentService {
    public void addAssessment(AssessmentCreateVo assessmentCreateVo);

    public Boolean deletAssessment(Long assessmentId);

    public Assessment createAssessment(Assessment assessment);

    public Page<Assessment> searchAssessments(Page<Assessment> page, Map<String, Object> conditions, Sort sort);

    public List<AssessmentDetail> getAndInitAssessmentDetails(Long assessmentId);

    public List<AssessmentDetail> findAssessmentDetailsByAssessmentId(Long assessmentId);

    public boolean updateAssessmentDetails(List<AssessmentDetail> assessmentDetails);

    public Assessment getAssessmentByYearAndAssessmentedDeptIdAndAssessmentDeptId(Long year, Long assessmentedDeptId, Long assessmentDeptId);

    public List<Assessment> findAssessmentByYearAndAssessmentDeptId(Long year, Long assessmentDeptId);

    public List<Assessment> findAssessmentByYearAndAssessmentedDeptId(Long year, Long assessmentedDeptId);

    public AssessDetailTreeVo getAssessmentDetailTree(Long yearId);

    public AssessmentScore getAssessmentScoreByDetailIdAndUserId(Long detailId, Long userId);

    public AssessmentDetailShowVo getAssessmentDetailShowVo(Long detailId);

    public AssessmentScore createAssessmentScore(AssessmentScore assessmentScore);

    public List<AssessmentScore> findAssessmentScoresByAssessmentIdAndUserId(Long assessmentId, Long userId);

    public List<User> findScoreUsersByAssessmentId(Long assessmentId);

    public List<User> findAssessPersonsByAssessmentId(Long assessmentId);

    public void updateAssessmentPerson(AssessmentPersonCreateVo assessmentPersonCreateVo);

    public List<AssessmentDetail> findAssessmentDetailsByAssessmentIdAndHasWeight(Long assessmentId);
}
